package com.group6.controller;


import com.group6.entity.Prescription;
import com.group6.service.PrescriptionService;
import com.group6.vo.PrescriptionVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/Prescription")
public class PrescriptionController {

    @Resource
    private PrescriptionService prescriptionService;

    @RequestMapping("/PrescriptionAdd")
    public String PrescriptionAdd(@RequestBody PrescriptionVo prescriptionVo) {
        return prescriptionService.PrescriptionAdd(prescriptionVo);
    }




    @RequestMapping("/PrescriptionDelete")
    public String PrescriptionDelete(@RequestBody Prescription prescription) {
        return prescriptionService.PrescriptionDelete();
    }

    @RequestMapping("/PrescriptionList")
    public String PrescriptionList() {
        return prescriptionService.PrescriptionList();
    }

    @RequestMapping("/PrescriptionUpdate")
    public String PrescriptionUpdate(@RequestBody Prescription prescription) {
        return prescriptionService.PrescriptionUpdate(prescription);
    }

}
